package com.mmdccj.yugu.utils;

import cn.hutool.core.lang.Snowflake;

/**
 * @Author: star_
 * @date: 2023-11-25 18:42
 *
 * 雪花算法工具类
 */
public class SnowFlakeUtil {

    private static final Long datacenterId = 2L;

    private static final Long workerId = 1L;

    public static Long getSnowFlakeId() {
        return new Snowflake(datacenterId, workerId).nextId();
    }
}
